Optimal. Leaf size=25 \[ -\frac {a \cot (c+d x)}{d}+\frac {b \log (\tan (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {45}
\begin {gather*} \frac {b \log (\tan (c+d x))}{d}-\frac {a \cot (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rubi steps
\begin {align*} \int \csc ^2(c+d x) (a+b \tan (c+d x)) \, dx &=\frac {\text {Subst}\left (\int \frac {a+b x}{x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a}{x^2}+\frac {b}{x}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {a \cot (c+d x)}{d}+\frac {b \log (\tan (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 36, normalized size = 1.44 \begin {gather*} -\frac {a \cot (c+d x)}{d}-\frac {b (\log (\cos (c+d x))-\log (\sin (c+d x)))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 24, normalized size = 0.96
method | result | size |
derivativedivides | \(\frac {-\cot \left (d x +c \right ) a +b \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(24\) |
default | \(\frac {-\cot \left (d x +c \right ) a +b \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(24\) |
risch | \(-\frac {2 i a}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}+\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(57\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 25, normalized size = 1.00 \begin {gather*} \frac {b \log \left (\tan \left (d x + c\right )\right ) - \frac {a}{\tan \left (d x + c\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 62 vs.
\(2 (25) = 50\).
time = 0.35, size = 62, normalized size = 2.48 \begin {gather*} -\frac {b \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - b \log \left (-\frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4}\right ) \sin \left (d x + c\right ) + 2 \, a \cos \left (d x + c\right )}{2 \, d \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right ) \csc ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 35, normalized size = 1.40 \begin {gather*} \frac {b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) - \frac {b \tan \left (d x + c\right ) + a}{\tan \left (d x + c\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.63, size = 25, normalized size = 1.00 \begin {gather*} \frac {b\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )}{d}-\frac {a\,\mathrm {cot}\left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________